package vue;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

import manager.ColorManager;

public class PetitPion extends JPanel {

private Color couleur;
private ColorManager cm = new ColorManager();
	
	public PetitPion()
	{
		this.couleur = cm.getColor(-1);
	}
	
	public JPanel setColor(Color c)
	{
		this.couleur = c;
		this.repaint();
		return this;
	}
	
		public void paintComponent(Graphics g) {
			super.paintComponent(g);
			Color c = g.getColor();
			g.setColor(couleur);
			g.fillOval(10,10,20,20);
			g.setColor(c);
		}
}
